<script setup lang="ts">
import HeaderComponent from "./components/HeaderComponent.vue";
import {useRoute} from "vue-router";

const route = useRoute()
</script>

<template>
  <div id="basicLayout" v-if="!route.meta.admin">
    <a-layout>
      <a-layout-header v-if="route.path !== '/login' && route.meta.withoutHeader !== true">
        <HeaderComponent/>
      </a-layout-header>
      <a-layout-content>
        <router-view/>
      </a-layout-content>
      <a-layout-footer>
        <div class="footer">
          <a-typography-text>
            Copyright © 2023
            <br/>
            揽云四组
            <a-link/>
            <br/>
            本站图片及方剂信息来自于香港浸会大学中医药学院
          </a-typography-text>
        </div>
      </a-layout-footer>
    </a-layout>
  </div>
  <div id="admin" v-else>
    <router-view/>
  </div>
</template>

<style scoped>
#basicLayout {
  width: 100%;
  height: 100%;
}
:deep(#header) {
  padding: 0;
}
:deep(.arco-layout-footer) {
  background-color: #F7F9FA;
}
.footer{
  text-align: center;
}
</style>
